package com.example.demo.internettongxin.bsjiagou;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @Description Server
 * @Author songchuanlong
 * @Date 2025-05-30
 */
public class Server {
    public static void main(String[] args) throws Exception {
        ServerSocket serverSocket = new ServerSocket(9090);
        while (true) {
            Socket socket = serverSocket.accept();
            System.out.println("有人上线了"+socket.getRemoteSocketAddress());
            new SeverThread(socket).start();
        }
    }
}
